hvm, s3: HVM guest RTCs become unsync'ed across host S3.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 1 Feb 2010 14:03:06 +0000 (14:03 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 1 Feb 2010 14:03:06 +0000 (14:03 +0000)
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
xen/arch/x86/time.c

index 3b814964b316e5335c922495af35811a429ac289..29c8659d24e6a9a0d5dc278d8f56714c4cf8e730 100644 (file)
@@ -906,6 +906,19 @@ void update_domain_wallclock_time(struct domain *d)
     spin_unlock(&wc_lock);
 }
 
+static void update_domain_rtc(void)
+{
+    struct domain *d;
+
+    rcu_read_lock(&domlist_read_lock);
+
+    for_each_domain ( d )
+        if ( is_hvm_domain(d) )
+            rtc_update_clock(d);
+
+    rcu_read_unlock(&domlist_read_lock);
+}
+
 void domain_set_time_offset(struct domain *d, int32_t time_offset_seconds)
 {
     d->time_offset_seconds = time_offset_seconds;
@@ -1535,6 +1548,8 @@ int time_resume(void)
 
     update_vcpu_system_time(current);
 
+    update_domain_rtc();
+
     return 0;
 }